package com.linkhub.oms.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Locale;

/**
 * @Description: LocaleTypeEnum
 * @Author: echo
 * @Date: 2024/3/3 15:09
 * @Version: 1.0
 */
@Getter
@AllArgsConstructor
public enum LocaleTypeEnum implements IEnumConvert<String> {


    EN("en", Locale.US),
    ZH("cn", Locale.SIMPLIFIED_CHINESE),
    EN_US("en_US", EN.getLocale()),
    ZH_CN("zh_CN", ZH.getLocale());

    private final String key;
    private final Locale locale;


    @Override
    public String getCode() {
        return this.getKey();
    }
}
